home *** CD-ROM | disk | FTP | other *** search
- /***
- CBuffer class header file.
- ***/
-
- #ifndef CBuffer_INC
- #define CBuffer_INC
-
- typedef int (FAR PASCAL *CALLBACK)(LPVOID, LONG);
-
- class CBuffer {
- public:
- // Create the list object.
- CBuffer(WORD nItemSize);
- // Append an item to the list.
- BOOL AppendItem(LPVOID lpItem);
- // Delete an item from the list.
- BOOL DeleteItem(WORD Index);
- // Return an item from the list.
- BOOL GetItem(LPVOID lpItem, WORD Index);
- // Do a function call for each item in the list.
- void DoForEach(CALLBACK lpFunc, LONG lParam);
- // Get the count of items.
- WORD GetItemCount(void) { return ItemCount; }
- private:
-
- protected: // for later inheritance
- ~CBuffer() { GlobalFree(hList); }
- HANDLE hList;
- WORD ItemSize;
- WORD ItemCount;
-
- };
- #endif
-